<?php
require_once("../includes/auth.php");

// If via import page
if(isset($_POST['raidxml']))
{
    require("parse.php");
    require("../includes/db_stores.php");
    //store_players($players);
}

$titleloc = "Add/Edit Raid";
include("../includes/header.php");

$heroicboss = "";
if($items != NULL)
{
    $counter = 0;

    echo '<script language="javascript" type="text/javascript">' . PHP_EOL;
    echo 'var slotID = new Array();' . PHP_EOL;
    foreach($items as $item)
    {
        if($item->getHeroic() == "true")
        {
            $heroicboss = 'checked="checked"';
        }

        if($item->getSlot() != 0)
        {
            echo 'slotID[' . $counter++ . '] = "' . $item->getSlot() . '";';
        }
        else
        {
            echo 'slotID[' . $counter++ . '] = "-1";';
        }

        echo PHP_EOL;
    }
    echo '</script>' . PHP_EOL;
}
?>
<h2>Add/Edit Raid</h2>
<?php include("../includes/admin/raidform.php"); ?>
<?php include("../includes/footer.php"); ?>